package com.attendance.service.impl;

import com.attendance.entity.Flag;
import com.attendance.entity.FlagClockRecord;
import com.attendance.mapper.FlagMapper;
import com.attendance.service.FlagService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FlagServiceImpl implements FlagService {

    @Resource
    private FlagMapper mapper;

    @Override
    public void insert(Flag flag) {
        mapper.insert(flag);
    }

    @Override
    public List<Flag> selectFlagByEmail(String email) {
        return mapper.selectFlagByEmail(email);
    }

    @Override
    public List<Flag> selectFlagOverByEmail(String email) {
        return mapper.selectFlagOverByEmail(email);
    }

    @Override
    public List<FlagClockRecord> selectFlagByEmailAndID(String email, Integer flag_id) {
        return mapper.selectFlagByEmailAndID(email, flag_id);
    }

    @Override
    public void clockingFlag(FlagClockRecord flagClockRecord) {
        mapper.clockingFlag(flagClockRecord);
    }


}
